package xufei.storage.controller;

import com.xufei.common.domain.storage.Storage;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xufei.storage.service.StorageService;

@RestController
@RequestMapping("storage")
public class StorageController {

    private final StorageService storageService;

    public StorageController(StorageService storageService) {
        this.storageService = storageService;
    }

    @RequestMapping("updateResidue")
    public void updateResidue(@RequestBody Storage storage){
        storageService.updateResidue(storage);
    }

}
